package com.cms.common.hook.config;


import java.util.List;

public class PluginFiled {

    public static Filed createFiled(String name, String label_key, int type, String defaultValue, String description_key, String placeholder_key, String pluginId, List<FiledOptions> options) {
        Filed filed = new Filed();
        filed.setName(name);
        filed.setLabelKey(label_key);
        filed.setType(type);
        filed.setDefaultValue(defaultValue);
        filed.setDescriptionKey(description_key);
        filed.setPlaceholderKey(placeholder_key);
        filed.setPluginId(pluginId);
        filed.setOptions(options);
        return filed;
    }

    public static Filed createInputFiled(String name, String label_key, String defaultValue, String description_key, String placeholder_key, String pluginId) {
        return createFiled(name, label_key, FiledTypeEnum.TEXT.getIndex(), defaultValue, description_key, placeholder_key, pluginId, null);
    }

}
